<template>
  <div>
    <div class="logo">
      <van-nav-bar
      title="拜访详情"
      left-arrow
      @click-left="$router.push('/myClients')"
    >
      <template #right>
        <img
          src="../../assets/images/首页按钮.png"
          alt=""
          width="50%"
          @click="$router.push('/home')"
        />
      </template>
    </van-nav-bar>
      <div class="userPhoto">
        <img src="../../assets/images/头像.png" alt="" />
        <div class="bos"><p>{{ obj.custName }}</p>
        <p>录入人：{{obj.creatorUser}}</p></div>
      </div>
      <div class="box">
        <div class="connet">
          <div class="jiben">
            <img src="../../assets/images/基本信息.png" alt="" />
            <p>基本信息</p>
          </div>
          <div class="txt">
            <p><span>拜访标题</span>{{ obj.visitTitle }}</p>
            <p><span>拜访时间</span>{{obj.visitTime}}</p>
            <p><span>拜访地址</span>{{ obj.visitAddress }}</p>
            <p><span>拜访原因</span>{{ obj.sex }}</p>
            <p><span>拜访情况</span>{{ obj.visitSituation }}</p>
            <p class="tst"><span>竞争信息收集情况</span>{{ obj.collectSituation }}</p>
            <p><span>创建时间</span>{{ obj.createTime }}</p>
          </div>
        </div>
        <div class="img"></div>
      </div>
    </div>
  </div>
</template>

<script>
import { visitDetail } from "../../request/api";
export default {
  data() {
    return {
      obj: {},
    };
  },
  created() {
    // console.log(this.$route.params.id);
    visitDetail({
      id: this.$route.params.id,
    }).then((res) => {
      // console.log(res.data);
      this.obj = res.data;
    });
  },
  
};
</script>
 
<style lang = "less" scoped>

/deep/.van-nav-bar {
  background-color: #003399;

  .van-nav-bar__title,
  .van-icon-arrow-left::before {
    color: #fff;
  }
  .van-nav-bar__text {
    color: #fff;
  }
  .van-nav-bar__right {
    padding: 0;
  }
}

.logo {
  width: 100%;
  height: auto;
  position: relative;
  height: 210px;
  background-color: #003399;
  
  .userPhoto {
    display: flex;
    align-items: center;
    padding-left: 25px;
    width: 100%;
    box-sizing: border-box;
    img {

      width: 60px;
    }
    .bos{
        margin-left: 20px;
        width: 100px;
    }
    p {
      width: 150px;
      color: #fff;
    }
  }
  .box {
    width: 90%;
    margin: 20px auto 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  }
  .connet {
    width: 100%;
    height: 300px;
    background-color: #fff;

    border-radius: 10px 10px 0 0;
    box-sizing: border-box;
    padding: 15px;
    .jiben {
      display: flex;
      align-items: center;
      padding-bottom: 10px;
      border-bottom: 1px dashed #ccc;
      img {
        height: 18px;
        display: block;
        margin-right: 10px;
      }
    }
    .txt {
      padding-top: 10px;
      p {
        font-size: 14px;
        margin-bottom: 10px;
        
        span {
          width: 60px;
          display: inline-block;
          text-align: right;
          margin-right: 10px;
          color: #999;
        }
        .tst{
          display: flex;
          align-items: center;
          line-height: 30px;
        }
      }
    }
  }
  .img {
    width: 100%;
    height: 250px;
    background: url("../../assets/images/底纹.png") no-repeat center -800px;
  }
}
</style>